package com.hpq.chat.service.srategy.mark;

import com.hpq.chat.domain.enums.MessageMarkTypeEnum;
import org.springframework.stereotype.Component;

@Component
public class LikeStrategy extends AbstractMsgMarkStrategy{

    @Override
    protected MessageMarkTypeEnum getTypeEnum() {
        return MessageMarkTypeEnum.LIKE;
    }
    @Override
    public void doMark(Long uid,Long msgId) {
        super.doMark(uid,msgId);
        MsgMarkFactory.getStrategyNoNull(MessageMarkTypeEnum.DISLIKE.getType()).unMark(uid,msgId);
    }
}

